<?php
namespace app\validate;

use app\base\BaseValidate;

/**
 * 验证器-StoreBannerValidate
 * Class StoreBannerValidate
 * @package app\validate
 */
class StoreBannerValidate extends BaseValidate
{
    protected $rule = [
        'id' => 'require|number|notIn:0',
        'store_id|商家id' => 'require|number|notIn:0',
        'banner_title|标题' => 'require|max:30',
        'banner_src|图片地址' => 'require',
        'jump_type|跳转类型' => 'number|in:0,1,2,3',
        'status|状态' => 'number|in:0,1',
    ];

    //验证场景-审核状态
    public function sceneUpStatus()
    {
        return $this->only(['id','status']);
    }

}